import psutil
import subprocess
import time
import requests
import json

# 通用发送告警信息函数
def send_alert(method, title, content):
    method(title, content)

def cpu_info():
    return psutil.cpu_percent(interval=1)

def mem_percent():
    return psutil.virtual_memory().percent